//
//  CompanyJobDetailViewController.m
//  Btpin
//
//  Created by Vic on 2019/4/9.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "CompanyJobDetailViewController.h"
#import "JobDetailBaseInfoView.h"
#import "CompanyJobModel.h"
#import "CompanyJobEditViewController.h"
#import "LYJobHuntingController.h"

@interface CompanyJobDetailViewController ()
{
    CompanyJobModel *infoModel;
    
    UIScrollView *bottomScrollView;
    JobDetailBaseInfoView *headerView;
    UISwitch *switchBtn;
}

@end

@implementation CompanyJobDetailViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"职位详情";
    
    if (!self.bgColor) {
        self.bgColor = THEMECOLOR_OF_ORANGE;
    }
    
    [self loadData];
}
- (void)loadData {
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:self.id forKey:@"job_id"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobDetail_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            id data = responseObject[@"data"];
            self->infoModel = [[CompanyJobModel alloc] init];
            [self->infoModel setValuesForKeysWithDictionary:data];
            
            [self initUI];
            SVPHUDDismiss;
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)initUI {
    if (self.showToolButton) {
        UIButton *refreshBtn = [UIToolsControl initButtonWithFrame:CGRectMake(WIDTH-50*Scale, HeightOfStatusBar+3*Scale, 50*Scale, 36) imageName:nil target:self action:@selector(refreshBtnTap) title:@"刷新" titleColor:THEMECOLOR_OF_ORANGE];
        refreshBtn.titleLabel.font = Font(Font_15);
        UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithCustomView:refreshBtn];
        self.navigationItem.rightBarButtonItem = rightItem;
    }
    
    bottomScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT-SIMEmojKeyBoardkBottomNOSafeArea_Height-HeightOfStatusBarAndNavigationBar-((self.showToolButton)?55*Scale:0))];
    [self.view addSubview:bottomScrollView];
    
    CGFloat topViewHeight = ScalePS(45);
    UIView *topView = [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, topViewHeight) backgroundColor:THEMECOLOR_OF_GRAY];
    [bottomScrollView addSubview:topView];
    
    CGFloat width = (WIDTH-50*Scale)*0.35;
    NSString *leftCount = (infoModel.countInfoModel.contact_num?infoModel.countInfoModel.contact_num:@"0");
    NSString *leftText = [NSString stringWithFormat:@"%@人沟通过", leftCount];
    UILabel *leftLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, 0, width, ScalePS(45)) text:nil textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
    [topView addSubview:leftLbl];
    leftLbl.textAlignment = NSTextAlignmentCenter;
    NSMutableAttributedString *leftAtt = [[NSMutableAttributedString alloc] initWithString:leftText];
    [leftAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_9a9a9a range:NSMakeRange(0, leftText.length)];
    [leftAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_333333 range:NSMakeRange(0, leftCount.length)];
    leftLbl.attributedText = leftAtt;
    
    NSString *middleCount = (infoModel.countInfoModel.contact_num?infoModel.countInfoModel.contact_num:@"0");
    NSString *middleText = [NSString stringWithFormat:@"%@人查看过", leftCount];
    UILabel *middleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(leftLbl), 0, width, ScalePS(45)) text:nil textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
    [topView addSubview:middleLbl];
    middleLbl.textAlignment = NSTextAlignmentCenter;
    NSMutableAttributedString *middleAtt = [[NSMutableAttributedString alloc] initWithString:middleText];
    [middleAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_9a9a9a range:NSMakeRange(0, middleText.length)];
    [middleAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_333333 range:NSMakeRange(0, middleCount.length)];
    middleLbl.attributedText = middleAtt;
    
    UILabel *rightLbl = [UIToolsControl initLabelWithFrame:CGRectMake(WIDTH-140*Scale, 0, width, ScalePS(45)) text:@"职位开启：" textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
    [topView addSubview:rightLbl];
    
    switchBtn = [[UISwitch alloc] initWithFrame:CGRectMake(WIDTH-65*Scale, 5*Scale, 45*Scale, 22*Scale)];
    switchBtn.thumbTintColor = COLOR_OF_WHITE;
    switchBtn.onTintColor = THEMECOLOR_OF_ORANGE;
    [switchBtn addTarget:self action:@selector(switchBtnTap:) forControlEvents:UIControlEventValueChanged];
    switchBtn.transform = CGAffineTransformMakeScale(0.75, 0.75);
    [topView addSubview:switchBtn];
    if (infoModel && [infoModel.display isEqualToString:@"1"]) {
        [switchBtn setOn:YES];
    } else {
        [switchBtn setOn:NO];
    }
    
    
    headerView = [[JobDetailBaseInfoView alloc] initWithFrame:CGRectMake(0, EndY(topView), WIDTH, infoModel.allHeight) target:self info:infoModel showRightIcon:NO topBgColor:self.bgColor];
    [bottomScrollView addSubview:headerView];
    
    bottomScrollView.contentSize = CGSizeMake(0, EndY(headerView)+20*Scale);
    
    if (self.showToolButton) {
        UIButton *stickBtn = [UIToolsControl initButtonWithFrame:CGRectMake(10*Scale, EndY(bottomScrollView)+5*Scale, (WIDTH-30*Scale)*0.5, 46*Scale) imageName:nil target:self action:@selector(stickBtnTap) title:@"置顶" titleColor:THEMECOLOR_OF_TEXT_333333];
        stickBtn.layer.cornerRadius = 23*Scale;
        stickBtn.layer.masksToBounds = YES;
        stickBtn.layer.borderColor = THEMECOLOR_OF_TEXT_9a9a9a.CGColor;
        stickBtn.layer.borderWidth = 1;
        stickBtn.titleLabel.font = Font(Font_18);
        [self.view addSubview:stickBtn];
        
        UIButton *editBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(stickBtn)+10*Scale, StartY(stickBtn), ViewWidth(stickBtn), ViewHeight(stickBtn)) imageName:nil target:self action:@selector(editBtnTap) title:@"修改" titleColor:COLOR_OF_WHITE];
        editBtn.layer.cornerRadius = 23*Scale;
        editBtn.layer.masksToBounds = YES;
        editBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
        editBtn.titleLabel.font = Font(Font_18);
        [self.view addSubview:editBtn];
    }
}
- (void)editBtnTap {
    CompanyJobEditViewController *CJPVC = [[CompanyJobEditViewController alloc] init];
    CJPVC.id = self.id;
    CJPVC.infoModel = [infoModel copy];
    __weak __typeof(self)weakSelf = self;
    CJPVC.edit = ^(BOOL editFlag) {
        __strong __typeof(weakSelf)strongSelf = weakSelf;
        if (editFlag) {
            strongSelf.edit(YES);
        }
    };
    [self.navigationController pushViewController:CJPVC animated:YES];
}
- (void)stickBtnTap {
    NSLog(@"置顶");
    LYJobHuntingController *jobVC = [[LYJobHuntingController alloc] init];
    jobVC.service_alias = @"stick_jobs";
    jobVC.setmeal_id = @"0";
    jobVC.job_id = infoModel.id;
    jobVC.job_name = infoModel.title;
    jobVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:jobVC animated:YES];
    return;
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:@"stick_jobs" forKey:@"service_alias"];
    
    [BaseNetManager requestWithMethod:POST path:Person_GetServiceInfo_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)switchBtnTap:(UISwitch *)switchButton {
    NSLog(@"switchBtn:%@", switchButton.on?@"YES":@"NO");
    
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:self.id forKey:@"job_id"];
    [dic setObject:(switchButton.on?@"1":@"0") forKey:@"display"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobSwitch_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)refreshBtnTap {
    NSLog(@"refreshBtnTap");
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:self.id forKey:@"job_id"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobRefresh_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}

@end








/*
#import "CompanyJobDetailViewController.h"
#import "JobDetailBaseInfoView.h"
#import "CompanyJobModel.h"
#import "CompanyJobEditViewController.h"
#import "LYJobHuntingController.h"

@interface CompanyJobDetailViewController ()
{
    CompanyJobModel *infoModel;
    
    UIScrollView *bottomScrollView;
    JobDetailBaseInfoView *headerView;
    UISwitch *switchBtn;
}

@end

@implementation CompanyJobDetailViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"职位详情";
    
    [self loadData];
}
- (void)loadData {
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:self.id forKey:@"job_id"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobDetail_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            id data = responseObject[@"data"];
            self->infoModel = [[CompanyJobModel alloc] init];
            [self->infoModel setValuesForKeysWithDictionary:data];
            
            [self initUI];
            SVPHUDDismiss;
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)initUI {
    if (self.showToolButton) {
        UIButton *refreshBtn = [UIToolsControl initButtonWithFrame:CGRectMake(WIDTH-50*Scale, HeightOfStatusBar+3*Scale, 50*Scale, 36) imageName:nil target:self action:@selector(refreshBtnTap) title:@"刷新" titleColor:THEMECOLOR_OF_ORANGE];
        refreshBtn.titleLabel.font = Font(Font_15);
        UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithCustomView:refreshBtn];
        self.navigationItem.rightBarButtonItem = rightItem;
    }
    
    bottomScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT-HeightOfTabBarSafeMargin-HeightOfStatusBarAndNavigationBar-((self.showToolButton)?55*Scale:0))];
    [self.view addSubview:bottomScrollView];
    
    CGFloat topViewHeight = ScalePS(45);
    if ([infoModel.share_promote integerValue] == 1) {
        topViewHeight = ScalePS(110);
    }
    UIView *topView = [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, topViewHeight) backgroundColor:THEMECOLOR_OF_GRAY];
    [bottomScrollView addSubview:topView];
    
    CGFloat width = (WIDTH-50*Scale)*0.35;
    NSString *leftCount = (infoModel.countInfoModel.contact_num?infoModel.countInfoModel.contact_num:@"0");
    NSString *leftText = [NSString stringWithFormat:@"%@人沟通过", leftCount];
    UILabel *leftLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, 0, width, ScalePS(45)) text:nil textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
    [topView addSubview:leftLbl];
    leftLbl.textAlignment = NSTextAlignmentCenter;
    NSMutableAttributedString *leftAtt = [[NSMutableAttributedString alloc] initWithString:leftText];
    [leftAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_9a9a9a range:NSMakeRange(0, leftText.length)];
    [leftAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_333333 range:NSMakeRange(0, leftCount.length)];
    leftLbl.attributedText = leftAtt;
    
    NSString *middleCount = (infoModel.countInfoModel.contact_num?infoModel.countInfoModel.contact_num:@"0");
    NSString *middleText = [NSString stringWithFormat:@"%@人查看过", leftCount];
    UILabel *middleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(leftLbl), 0, width, ScalePS(45)) text:nil textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
    [topView addSubview:middleLbl];
    middleLbl.textAlignment = NSTextAlignmentCenter;
    NSMutableAttributedString *middleAtt = [[NSMutableAttributedString alloc] initWithString:middleText];
    [middleAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_9a9a9a range:NSMakeRange(0, middleText.length)];
    [middleAtt addAttribute:NSForegroundColorAttributeName value:THEMECOLOR_OF_TEXT_333333 range:NSMakeRange(0, middleCount.length)];
    middleLbl.attributedText = middleAtt;
    
    UILabel *rightLbl = [UIToolsControl initLabelWithFrame:CGRectMake(WIDTH-140*Scale, 0, width, ScalePS(45)) text:@"职位开启：" textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
    [topView addSubview:rightLbl];
    
    switchBtn = [[UISwitch alloc] initWithFrame:CGRectMake(WIDTH-65*Scale, 5*Scale, 45*Scale, 22*Scale)];
    switchBtn.thumbTintColor = COLOR_OF_WHITE;
    switchBtn.onTintColor = THEMECOLOR_OF_ORANGE;
    [switchBtn addTarget:self action:@selector(switchBtnTap:) forControlEvents:UIControlEventValueChanged];
    switchBtn.transform = CGAffineTransformMakeScale(0.75, 0.75);
    [topView addSubview:switchBtn];
    if (infoModel && [infoModel.display isEqualToString:@"1"]) {
        [switchBtn setOn:YES];
    } else {
        [switchBtn setOn:NO];
    }
    
    if ([infoModel.share_promote integerValue] == 1) {
        UIView *topShowDetailView = [UIToolsControl initViewWithFrame:CGRectMake(0, ScalePS(45), WIDTH, ScalePS(65)) backgroundColor:RGB(250, 240, 190)];
        [topView addSubview:topShowDetailView];
        
        UILabel *topSharePromoteTopLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(20), ScalePS(7.5), 300, ScalePS(25)) text:[NSString stringWithFormat:@"悬赏金额：%@    出价：%@聘豆/次", infoModel.share_promote_info.total_amount, infoModel.share_promote_info.once_price] textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_12];
        [topShowDetailView addSubview:topSharePromoteTopLbl];
        
        UILabel *topSharePromoteBottomLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(topSharePromoteTopLbl), EndY(topSharePromoteTopLbl), ViewWidth(topSharePromoteTopLbl), ViewHeight(topSharePromoteTopLbl)) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_13];
        [topShowDetailView addSubview:topSharePromoteBottomLbl];
        NSString *priceBottomText1 = [NSString stringWithFormat:@"被推广次数：%@    赏金余额：%@", infoModel.share_promote_info.click_times, infoModel.share_promote_info.remain_amount];
        NSString *priceBottomText2 = [NSString stringWithFormat:@"被推广次数：%@    赏金余额：", infoModel.share_promote_info.click_times];
        NSString *priceBottomText3 = infoModel.share_promote_info.click_times;
        NSMutableAttributedString *priceBottomAtt = [[NSMutableAttributedString alloc] initWithString:priceBottomText1];
        [priceBottomAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_RED} range:NSMakeRange(0, priceBottomText1.length)];
        [priceBottomAtt addAttributes:@{NSFontAttributeName:Font(Font_13), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_666666} range:NSMakeRange(0, priceBottomText2.length)];
        [priceBottomAtt addAttributes:@{NSFontAttributeName:Font(Font_14), NSForegroundColorAttributeName:THEMECOLOR_OF_RED} range:NSMakeRange(6, priceBottomText3.length)];
        topSharePromoteBottomLbl.attributedText = priceBottomAtt;
        
        UIImageView *topIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(WIDTH-ScalePS(50), ScalePS(18), ScalePS(28), ScalePS(28)) imageName:@"companyjob_shang_big_icon"];
        [topShowDetailView addSubview:topIconImgView];
    }
    
    headerView = [[JobDetailBaseInfoView alloc] initWithFrame:CGRectMake(0, EndY(topView), WIDTH, infoModel.allHeight) target:self info:infoModel showRightIcon:NO];
    [bottomScrollView addSubview:headerView];
    
    bottomScrollView.contentSize = CGSizeMake(0, EndY(headerView)+20*Scale);
    
    if (self.showToolButton) {
        UIButton *stickBtn = [UIToolsControl initButtonWithFrame:CGRectMake(10*Scale, EndY(bottomScrollView)+5*Scale, (WIDTH-30*Scale)*0.5, 46*Scale) imageName:nil target:self action:@selector(stickBtnTap) title:@"置顶" titleColor:THEMECOLOR_OF_TEXT_333333];
        stickBtn.layer.cornerRadius = 23*Scale;
        stickBtn.layer.masksToBounds = YES;
        stickBtn.layer.borderColor = THEMECOLOR_OF_TEXT_9a9a9a.CGColor;
        stickBtn.layer.borderWidth = 1;
        stickBtn.titleLabel.font = Font(Font_18);
        [self.view addSubview:stickBtn];
        
        UIButton *editBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(stickBtn)+10*Scale, StartY(stickBtn), ViewWidth(stickBtn), ViewHeight(stickBtn)) imageName:nil target:self action:@selector(editBtnTap) title:@"修改" titleColor:COLOR_OF_WHITE];
        editBtn.layer.cornerRadius = 23*Scale;
        editBtn.layer.masksToBounds = YES;
        editBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
        editBtn.titleLabel.font = Font(Font_18);
        [self.view addSubview:editBtn];
    }
}
- (void)editBtnTap {
    CompanyJobEditViewController *CJPVC = [[CompanyJobEditViewController alloc] init];
    CJPVC.id = self.id;
    CJPVC.infoModel = [infoModel copy];
    __weak __typeof(self)weakSelf = self;
    CJPVC.edit = ^(BOOL editFlag) {
        __strong __typeof(weakSelf)strongSelf = weakSelf;
        if (editFlag) {
            strongSelf.edit(YES);
        }
    };
    [self.navigationController pushViewController:CJPVC animated:YES];
}
- (void)stickBtnTap {
    NSLog(@"置顶");
    LYJobHuntingController *jobVC = [[LYJobHuntingController alloc] init];
    jobVC.service_alias = @"stick_jobs";
    jobVC.setmeal_id = @"0";
    jobVC.job_id = infoModel.id;
    jobVC.job_name = infoModel.title;
    jobVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:jobVC animated:YES];
    return;
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:@"stick_jobs" forKey:@"service_alias"];
    
    [BaseNetManager requestWithMethod:POST path:Person_GetServiceInfo_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)switchBtnTap:(UISwitch *)switchButton {
    NSLog(@"switchBtn:%@", switchButton.on?@"YES":@"NO");
    
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:self.id forKey:@"job_id"];
    [dic setObject:(switchButton.on?@"1":@"0") forKey:@"display"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobSwitch_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)refreshBtnTap {
    NSLog(@"refreshBtnTap");
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [dic setObject:self.id forKey:@"job_id"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobRefresh_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}

@end
*/
